// Created by Joe on 2017/8/3.

app.service(
    'HotlineService',
    [
        'config', 'RequestProxyService',
        function (config, RequestProxyService) {
            return {
                getAnswerInfo: function (number, pass) {
                    return RequestProxyService.requestProxy('/app/getHotPhoneAnswer', {},
                        {number: number, pass: pass},
                        function (resolve, info) {
                            resolve(info.result);
                        })();
                },
                getHistoryInfo: RequestProxyService.requestProxy('/app/getHotPhoneHisInfo', {},
                    {cityCode: config.curCity.cityCode},
                    function (resolve, info) {
                        resolve(info.result);
                    })
            };
        }
    ]
);